const express = require('express');
const router = express.Router();
const db = require('../../utils/db');

router.get('/getdiscountfood',function(req,res){
    let mysql='SELECT pack_discount,menu_price FROM package_list JOIN menu_file ON package_list.pack_num=menu_file.menu_id';
    db(mysql,null,(err,data)=>{
        if (err) {
            return res.json({
              code: 500,
              msg: '查询折扣商品失败'
            })
          }
          res.json({
            code: 200,
            msg: '查询折扣商品成功',
            data: data
          })
    })
})

module.exports = router